using System;
using System.Collections.Generic;
using System.Text;
using THSERP.BusinessEntities;
using THSERP.BaseProvider;

namespace THSERP.Modules.ProjectConfig
{
    public class ProjectConfigEntities : ERPModuleEntities
    {
        #region Constants
        public const string strPMPhaseTypesObject = "PMPhaseTypes";
        #endregion

        #region Variables
        PMPhaseTypesInfo _PMPhaseTypesObject;
        
        public THSList<PMPhaseTypesInfo> _lstPMPhaseTypes;
        #endregion

        #region Public Properties
        public PMPhaseTypesInfo PMPhaseTypesObject
        {
            get
            {
                return _PMPhaseTypesObject;
            }
            set
            {
                _PMPhaseTypesObject = value;
            }
        }

        public THSList<PMPhaseTypesInfo> PMPhaseTypesList
        {
            get
            {
                return _lstPMPhaseTypes;
            }
            set
            {
                _lstPMPhaseTypes = value;
            }
        }
        #endregion

        #region Constructor
        public ProjectConfigEntities()
            : base()
        {
            PMPhaseTypesObject = new PMPhaseTypesInfo();

            PMPhaseTypesList = new THSList<PMPhaseTypesInfo>();
        }
        #endregion

        #region Init Main Object,Module Objects functions
        public override void InitMainObject()
        {

        }

        public override void InitModuleObjects()
        {
            ModuleObjects.Add(ProjectConfigEntities.strPMPhaseTypesObject, PMPhaseTypesObject);
        }

        public override void InitModuleObjectList()
        {
            PMPhaseTypesList.InitTHSList(this, String.Empty, ProjectConfigEntities.strPMPhaseTypesObject);
        }

        public override void InitGridControlInTHSList()
        {
            PMPhaseTypesList.InitTHSListGridControl();
        }

        public override void SetDefaultModuleObjectsList()
        {
            try
            {
                PMPhaseTypesList.SetDefaultListAndRefreshGridControl();
            }
            catch (Exception)
            {
                return;
            }
        }

        #endregion

        public override void InitModuleEntity()
        {
            base.InitModuleEntity();

            UpdateModuleObjectBindingSource(ProjectConfigEntities.strPMPhaseTypesObject);
        }
        #region Invalidate Module Objects functions
        public override void InvalidateModuleObjects(int iObjectID)
        {
            
        }
        #endregion

        #region Save Module Objects functions
        public override void SaveModuleObjects()
        {

        }
        #endregion
    }
}
